﻿using System;
using System.Collections;
using System.Windows;
using System.Windows.Forms;
using HR60_PanelSoft.Model;
using HR60_PanelSoft.View.Base;

namespace HR60_PanelSoft.View.TabForms
{
	public partial class GroupForm : BaseForm
	{
		public GroupForm()
		{
			InitializeComponent();
		}

		// 绑定数据
		public override void refreshFormData(System.Collections.Generic.IDictionary<string, object> dataMap)
		{
			DeviceGroup group = (DeviceGroup)dataMap["group"];
			txtName.Value = group.name;
		}

		// 数据修改事件
		public override void onFormChanged(BaseFormControl sender, System.EventArgs e)
		{
			windowMain.doSaveDeviceGroup((DeviceGroup)this.bindDataMap["group"], this.getFields());
		}
	}
}
